home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / ced10c.arc / CED.DOC < prev   
Encoding:
Text File  |  1985-06-15  |  67.4 KB  |  1,812 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                              ==========================
  27.                               CED - DOS Command Editor
  28.                                     User's Guide
  29.                                     Version  1.0
  30.                              ==========================
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.                                  Copyright (c) 1985
  38.                                Christopher J. Dunford
  39.                               10057-2 Windstream Drive
  40.                               Columbia, Maryland 21044
  41.                                    (301) 992-9371
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.                                     Contents
  49.  
  50.                Purpose . . . . . . . . . . . . . . . . . . . .   1
  51.                System Requirements . . . . . . . . . . . . . .   1
  52.                Terminology . . . . . . . . . . . . . . . . . .   1
  53.                Installation  . . . . . . . . . . . . . . . . .   2
  54.                Command line editor . . . . . . . . . . . . . .   3
  55.                     Typeover and insert modes  . . . . . . . .   3
  56.                     Cursor movement keys . . . . . . . . . . .   3
  57.                     Text deletion keys . . . . . . . . . . . .   4
  58.                DOS command stack . . . . . . . . . . . . . . .   5
  59.                Application program command stack . . . . . . .   6
  60.                Pcall function  . . . . . . . . . . . . . . . .   6
  61.                Synonyms  . . . . . . . . . . . . . . . . . . .   7
  62.                Command chaining  . . . . . . . . . . . . . . .   9
  63.                Command parameters  . . . . . . . . . . . . . .  11
  64.                Ignoring commands . . . . . . . . . . . . . . .  13
  65.                Ignoring individual commands  . . . . . . . . .  13
  66.                Clearing ced objects  . . . . . . . . . . . . .  14
  67.                Configuration files . . . . . . . . . . . . . .  15
  68.                Changing default buffer sizes . . . . . . . . .  16
  69.                Status display  . . . . . . . . . . . . . . . .  17
  70.                Multiple definitions  . . . . . . . . . . . . .  18
  71.                User-installed commands . . . . . . . . . . . .  18
  72.                     Subfunction 0: Enqueue . . . . . . . . . .  19
  73.                     Subfunction 1: Dequeue . . . . . . . . . .  19
  74.                     Return registers . . . . . . . . . . . . .  20
  75.                     Command processor  . . . . . . . . . . . .  20
  76.                Problem reporting . . . . . . . . . . . . . . .  21
  77.                Copyright and Disclaimer  . . . . . . . . . . .  22
  78.                Future of ced . . . . . . . . . . . . . . . . .  23
  79.                Appendix A: Command summary . . . . . . . . . .  24
  80.                Appendix B: Order of Processing . . . . . . . .  26
  81.                Appendix C: Limitations . . . . . . . . . . . .  27
  82.                Appendix D: Versions  . . . . . . . . . . . . .  28
  83.                Appendix E: User Command Demo . . . . . . . . .  29
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.                             === Ced User's Guide ===
  102.  
  103.  
  104.  
  105.                                                                           1
  106.  
  107.           Purpose
  108.           -------
  109.  
  110.           Ced (which stands for Command EDitor) provides the following
  111.           functions at the DOS prompt, or from within certain applications
  112.           programs:
  113.  
  114.                -- Improved command line editing facility.
  115.  
  116.                -- Recall of previously issued commands for re-entry.
  117.  
  118.                -- Command synonyms, which may include "chaining" of a
  119.                series of commands.
  120.  
  121.                -- Parameterization of synonym commands.
  122.  
  123.                -- Recall of parameters for previously issued commands.
  124.  
  125.                -- User-settable buffer sizes for all functions.
  126.  
  127.                -- For programmers, a facility to add new "resident"
  128.                commands to the DOS shell.
  129.  
  130.  
  131.           System Requirements
  132.           -------------------
  133.  
  134.           Ced was written for the IBM PC/XT/AT and true compatibles. 
  135.           However, it uses no hardware-specific functions, so it will
  136.           probably work with any MS-DOS machine; nonetheless, I cannot
  137.           promise that it will function on any machine other than those it
  138.           was written for.
  139.  
  140.           Ced requires DOS Version 2.00 or later.  It increases the size of
  141.           resident DOS by about 16K bytes when installed.  Most of this
  142.           space is, however, used for data storage, and the amount of
  143.           storage can be reduced.  Thus, smaller versions of ced are
  144.           possible.
  145.  
  146.  
  147.           Terminology
  148.           -----------
  149.  
  150.           This document will usually refer to "commands" or "DOS commands"
  151.           as ced targets; you should take this to mean either (a) actual
  152.           DOS commands, or (b) input to ced-compatible programs (for
  153.           example, DEBUG commands).
  154.  
  155.  
  156.  
  157.  
  158.                             === Ced User's Guide ===
  159.  
  160.  
  161.  
  162.                                                                           2
  163.  
  164.           Key names are as follows:
  165.  
  166.           <Up>           The up-arrow key on the numeric keypad.
  167.           <Down>         The down-arrow key on the numeric keypad.
  168.           <Left>         The left-arrow key on the numeric keypad.
  169.           <Right>        The right-arrow key on the numeric keypad.
  170.           <Backspace>    The large left-arrow key, next to NumLock.
  171.  
  172.           A caret (^) means to press the Ctrl key in conjunction with a
  173.           named key; for example, <^End> means "press and hold the Ctrl
  174.           key, then press <End>".
  175.  
  176.           Words in CAPS are ced keywords and must be typed exactly as shown
  177.           (they need not be capitalized when you use them).
  178.  
  179.           Words in [brackets] are optional elements of a command.
  180.  
  181.  
  182.           Installation
  183.           ------------
  184.  
  185.           Installation (in its simplest form) is accomplished by typing
  186.           "ced" at the DOS prompt, or including the statement "ced" in your
  187.           AUTOEXEC.BAT file.  There are optional parameters when installing
  188.           ced; these will be covered later.
  189.  
  190.           After ced is installed, everything will appear to be normal, but
  191.           you now have many new features when entering DOS commands.  The
  192.           remainder of this document will describe these features.
  193.  
  194.           Ced is active either at the DOS prompt, or when an application
  195.           program requests buffered keyboard input from DOS (DOS function
  196.           0AH).  There are a few such programs (DEBUG and EDLIN are two);
  197.           but the main use of ced is at the DOS prompt.  
  198.  
  199.           Once ced has been installed, the command "CED" becomes an
  200.           internal DOS command.  Thus, when you want to issue ced commands
  201.           (as explained below), you will type "CED <command>", but the
  202.           program file (CED.COM) need NOT be available on disk.  Ced
  203.           becomes fully memory resident and is an extension to DOS after
  204.           installation.  In particular, this means that you should NOT
  205.           include a drive or path in issuing CED commands after initial
  206.           installation.  A command like "C:CED SYN d dir" will reload ced,
  207.           which is probably not what you intend.
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.                             === Ced User's Guide ===
  216.  
  217.  
  218.  
  219.                                                                           3
  220.  
  221.           Command line editor
  222.           -------------------
  223.  
  224.           Ced provides a new "editor" for DOS commands.  You will use this
  225.           editor whenever you type a DOS command, or when you enter data to
  226.           a compatible program such as DEBUG.  Ced's editor replaces all of
  227.           the DOS editing keys, including F1-F5.
  228.  
  229.           There are two big differences between the ced editor and the DOS
  230.           editor.  First, the ced editor always allows you to see all of
  231.           your data; where the DOS editor likes to "hide" characters, the
  232.           ced editor always displays all of the characters that it is
  233.           using.  Second, the ced editor allows you to move the cursor
  234.           around within a command, which makes correcting and altering
  235.           commands much easier.  The keystrokes that ced uses for editing
  236.           are very similar to those used by many word processors and text
  237.           editors; you will find command entry and editing to be much more
  238.           natural than with the DOS editor. 
  239.  
  240.  
  241.           TYPEOVER AND INSERT MODES
  242.  
  243.           The Ced editor had two basic modes: the typeover mode and the
  244.           insert mode.  In typeover (the normal mode), anything you type
  245.           will add to or replace the text currently displayed.  In insert
  246.           mode, anything you type will be inserted into the text at the
  247.           current cursor position, moving any characters to the right of
  248.           the cursor out of the way.  The <Ins> key toggles between
  249.           typeover and insert modes.  
  250.  
  251.           To demonstrate this, type some text at the DOS prompt, then use
  252.           the left-arrow key to move the cursor into the text you just
  253.           entered (note that the text is not erased; the arrow key simply
  254.           moves the cursor).  Now type a few characters and observe
  255.           that they replace the text already there; this is typeover.  Now
  256.           press the <Ins> key once to enter insert mode (note that the
  257.           cursor changes size to let you know that you're in insert mode),
  258.           and type some more text.  Note that the new text is inserted into
  259.           your "command", and the remaining text is moved right, out of the
  260.           way.  Press <Esc> to erase the command completely.
  261.            
  262.  
  263.           CURSOR MOVEMENT KEYS
  264.  
  265.           Ced uses the following keys to move the cursor around within the
  266.           command you are typing:
  267.  
  268.           <Home>              Moves the cursor to the "home" position, that
  269.                               is, to the first character.
  270.  
  271.  
  272.                             === Ced User's Guide ===
  273.  
  274.  
  275.  
  276.                                                                           4
  277.  
  278.           <End>               Moves the cursor to the end position (follow-
  279.                               ing the last character displayed).
  280.  
  281.           <Left>              Moves the cursor left one character.  This
  282.                               does not erase any characters; it simply
  283.                               moves the cursor.  Remember that <Left> is
  284.                               the left-arrow key on the numeric keypad (key
  285.                               4), not the backspace key (the larger left
  286.                               arrow next to NumLock).
  287.  
  288.           <Right>             Moves the cursor right one character.
  289.  
  290.           <^Left>             Moves the cursor left one word.  A "word" is
  291.                               any sequence of characters bounded by one or
  292.                               more spaces; the cursor will be placed on
  293.                               the first character of the previous "word".
  294.  
  295.           <^Right>            Moves the cursor right one word; it will be
  296.                               placed on the first character of the next
  297.                               word.
  298.  
  299.  
  300.           TEXT DELETION KEYS
  301.  
  302.           You can use the following Ced editor keys to delete text:
  303.  
  304.           <Del>               Deletes the character at the cursor position.
  305.  
  306.           <Backspace>         Deletes the character to the left of the
  307.                               cursor position, and moves the cursor left. 
  308.                               This is known as a destructive backspace; it
  309.                               is exactly equivalent to keying <Left>
  310.                               followed by <Del>.
  311.  
  312.           <^End>              Deletes all characters from the cursor
  313.                               position to end of the command.
  314.  
  315.           <^Home>             Deletes all characters from the home position
  316.                               (first character) to the cursor position, not
  317.                               including the character at the cursor
  318.                               position.
  319.            
  320.           <Esc>               Cancel: erases the command completely and
  321.                               allows you to start over.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.                             === Ced User's Guide ===
  330.  
  331.  
  332.  
  333.                                                                           5
  334.  
  335.           DOS command stack
  336.           -----------------
  337.  
  338.           Ced keeps a record of each command you enter.  You can retrieve
  339.           and re-enter these commands by using the <Up> and <Down> keys to
  340.           display the old commands, then pressing <Enter> when the desired
  341.           command is displayed (the command can be edited, of course).
  342.  
  343.           You can visualize the stored data as a "stack" of commands. 
  344.           Ced keeps a pointer to somewhere in this stack.  The pointer
  345.           always points to a location "between" two commands; when you
  346.           press <Up>, ced displays the command "above" the pointer, then
  347.           moves the pointer up one command.  When you press <Down>, ced
  348.           displays the command "below" the pointer, then moves the pointer
  349.           down one command.
  350.  
  351.           For example, suppose you have entered commands A, B, and C. The
  352.           stack will appear as follows:
  353.  
  354.                               +-------------+
  355.                               |      A      |
  356.                               +-------------+
  357.                               |      B      |
  358.                               +-------------+
  359.                               |      C      |
  360.                               +-------------+  <-- pointer
  361.  
  362.           The stack is circular in nature; thus, if the pointer points
  363.           "below" the last command in the stack (as it does above), it is
  364.           actually between the last command (C) and the first command
  365.           (A).  In the situation above, pressing <Up> will display command
  366.           C and leave the pointer between B and C.  Pressing <Down> will
  367.           display command A, and leave the pointer between A and B.
  368.  
  369.           When you recall an old command and re-enter it without editing,
  370.           the re-entered command is not added to the stack, and the pointer
  371.           will drop one level.  Suppose, for example, that you press <Up>
  372.           twice from the position above (pointer below C): B is displayed,
  373.           and the stack looks like this:
  374.  
  375.  
  376.                               +-------------+
  377.                               |      A      |
  378.                               +-------------+ <-- pointer
  379.                               |      B      |
  380.                               +-------------+
  381.                               |      C      |
  382.                               +-------------+
  383.  
  384.  
  385.  
  386.                             === Ced User's Guide ===
  387.  
  388.  
  389.  
  390.                                                                           6
  391.  
  392.           If you now press <Enter> (without editing the command), command B
  393.           will be sent to DOS, and the pointer will drop to point between B
  394.           and C.  From there, <Up> will display B again, and <Down> will
  395.           display C.  Thus you can "recycle" a series of commands by
  396.           pressing <Up> until you see the first command, <Enter> to execute
  397.           it, then a series of <Down><Enter> sequences to re-execute the
  398.           commands in the original order.
  399.  
  400.           If you retrieve an old command and edit it before execution, the
  401.           newly edited command is added to the bottom of the stack, and the
  402.           pointer will point just below it.
  403.  
  404.           Ced will not stack any commands of two characters or less (the
  405.           theory being that it's easier to retype than to go searching
  406.           through the stack).
  407.  
  408.           You can remove a command from the stack by displaying it and
  409.           pressing <^PgDn>, and you can clear the entire stack by pressing
  410.           <^PgUp>.
  411.  
  412.           The actual number of commands which will be held in the stack is
  413.           a function of the length of the commands and the size of the
  414.           stack (which can be increased; see below for details).
  415.  
  416.           This is one of those computer gizmos that's easier to use than it
  417.           is to explain.  Just play with <Up> and <Down>; you'll get the
  418.           idea.
  419.  
  420.  
  421.           Application program command stack
  422.           ---------------------------------
  423.  
  424.           Ced actually keeps two complete command stacks: one is for DOS
  425.           commands, the other for commands entered into compatible appli-
  426.           cation programs (DEBUG, et al).  Thus, DOS commands will not
  427.           appear in the command stack while in DEBUG, and vice versa.
  428.  
  429.  
  430.           Pcall function
  431.           --------------
  432.  
  433.           "Pcall" stands for parameter recall; this is a second way to
  434.           quickly retrieve old commands.  Pcall simply remembers old
  435.           parameters to specific commands.  For example, suppose you have
  436.           an editor called "edit", and the last time you executed it, you
  437.           used "edit c:\util\foo.doc".  If you now enter "edit" without any
  438.           parameters, ced will assume that you want to edit the same file
  439.           and will supply the "c:\util\foo.doc" for you.
  440.  
  441.  
  442.  
  443.                             === Ced User's Guide ===
  444.  
  445.  
  446.  
  447.                                                                           7
  448.  
  449.           You could, of course, scroll back through the command buffer to
  450.           find the old command, but it might take a while to find it (and
  451.           the command might be missing if it was too long ago).
  452.  
  453.           Because many commands are best used WITHOUT parameter recall
  454.           (FORMAT and ERASE are good examples), ced will only use pcall on
  455.           commands that you specify.   To make a command "pcallable", type
  456.  
  457.                CED PCALL <command>
  458.  
  459.           at the DOS prompt.  For example, if you want to make "edit" a
  460.           pcall command, type
  461.  
  462.                CED PCALL edit
  463.  
  464.           (Remember that the ced diskette need not be available).
  465.  
  466.           If you wish to issue a command for which pcall is enabled, but
  467.           you do not want it to have parameters, add a space after the
  468.           command.  For example, suppose you have issued a "CED PCALL dir"
  469.           command and your last dir was a "dir *.exe". If you now type
  470.           "dir", ced will add the "*.exe" automatically.  However, if you
  471.           type "dir " (note the space), ced will not add the "*.exe", and
  472.           you'll get a full directory. 
  473.  
  474.           You may also bypass pcall processing through the use of the
  475.           ignore character; see below, under "Ignoring Individual
  476.           Commands".
  477.  
  478.  
  479.           Synonyms
  480.           --------
  481.  
  482.           The synonym function allows you to define brief "synonyms" for
  483.           frequently used commands.  For example, suppose you invoke your
  484.           communications package by typing "talk rbbs /c63".  Ced allows
  485.           you to abbreviate this to a shorter command, say, "bb", by
  486.           typing at the DOS prompt:
  487.  
  488.                CED SYN bb talk rbbs /c63
  489.  
  490.           The exact syntax is:
  491.  
  492.                CED SYN <synonym> <command>
  493.  
  494.           The <synonym> is the command abbreviation (which you will type at
  495.           the DOS prompt), and <command> is the word or phrase which ced
  496.           will substitute when it sees <synonym>.  The synonym is always
  497.           the first word after the keyword "syn", and <command> is always
  498.           all of the remaining words.
  499.  
  500.                             === Ced User's Guide ===
  501.  
  502.  
  503.  
  504.                                                                           8
  505.  
  506.  
  507.           For example, "ced syn d dir" allows you to type "d" instead of
  508.           "dir".  You may add parameters: "d *.exe" becomes equivalent to
  509.           "dir *.exe".
  510.  
  511.           Many people define very short synonyms for frequently used
  512.           commands:
  513.  
  514.                CED SYN d dir
  515.                CED SYN e edit
  516.                CED SYN g debug
  517.                CED SYN l link
  518.                CED SYN rbbs talk rbbs /c63
  519.                CED SYN cc1 cc1 -bpe
  520.  
  521.           Note in the last example that you can use a synonym which is
  522.           identical to its associated phrase and simply use it to automat-
  523.           ically add parameters.
  524.  
  525.           Also note that synonym processing takes place AFTER pcall
  526.           processing; thus if you use a command synonym and wish the
  527.           command to be "pcallable", use the synonym in the pcall command.
  528.           For example:
  529.  
  530.                CED SYN e edit
  531.                CED PCALL e    (not PCALL edit)
  532.  
  533.  
  534.           User program synonyms
  535.           ---------------------
  536.  
  537.           Because ced "knows" whether it is being used from the DOS prompt
  538.           or from an application program such as DEBUG, it is possible to
  539.           define separate sets of synonyms for DOS commands and for user
  540.           programs.  The syntax for a "user synonym" is
  541.  
  542.                CED USERSYN <synonym> <command>
  543.  
  544.           This is identical to the SYN command except for the new keyword
  545.           USERSYN.  For example, if you need to frequently type the DEBUG
  546.           command "d ds:1010 1200", you might use
  547.  
  548.                CED USERSYN d1 d es:1010 1200
  549.  
  550.           (Remember that DEBUG is a ced-compatible program; thus you can
  551.           type ced commands at the DEBUG prompt.)  Then you could simply
  552.           type "d1" to dump memory from the specified address.  Note
  553.           that  a "d1" USERSYN is separate from a "d1" SYN; at the DOS
  554.           prompt you'd get the SYN, in DEBUG or EDLIN you'd get the
  555.           USERSYN.
  556.  
  557.                             === Ced User's Guide ===
  558.  
  559.  
  560.  
  561.                                                                           9
  562.  
  563.  
  564.  
  565.           Command chaining
  566.           ----------------
  567.  
  568.           The command chaining feature allows you to place more than one
  569.           command in a SYN or USERSYN.  These commands would be passed to
  570.           DOS or to the user program one at a time, as input is requested. 
  571.           Suppose, for example, that in order to run your communications
  572.           package, you always type:
  573.  
  574.                cd \talk
  575.                talk cis /c63
  576.                cd \
  577.  
  578.           You could put this sequence into one synonym by typing
  579.  
  580.                CED SYN cis cd \talk^talk cis /c63^cd \
  581.  
  582.           The ^ character serves as a command separator.  When you type CIS
  583.           at the prompt, ced will output everything up to the ^ (in this
  584.           case, "cd \talk") and then simulate an <Enter>.  The next time
  585.           DOS requests input, it will get "talk cis /c63<Enter>", and so
  586.           on.
  587.  
  588.           Note that ced will not pass DOS-chained commands to user
  589.           programs; thus, in
  590.  
  591.                CED SYN bug cd \util^debug^cd \
  592.  
  593.           DEBUG would not see the trailing "cd \", which would still be
  594.           held up until you return to the DOS prompt.
  595.  
  596.           The first of the chained commands (e.g., the first 'cd \' above)
  597.           cannot itself be a synonym, but the remaining commands can.  That
  598.           is, if 'f' and 'g' are synonyms, the command
  599.  
  600.                CED SYN h dir^f^g
  601.  
  602.           will work as you expect.  Be careful, though.  A command like
  603.  
  604.                CED SYN f dir^f
  605.  
  606.           will put the computer into a loop from which there is no retreat.
  607.  
  608.           It may be useful in some circumstances, however, to fool ced into
  609.           allowing the first command to be a synonym by simply inserting a
  610.           ^ as the first character of the chain:
  611.  
  612.                CED SYN d dir
  613.  
  614.                             === Ced User's Guide ===
  615.  
  616.  
  617.  
  618.                                                                          10
  619.  
  620.                CED SYN f ^d^cd \
  621.  
  622.           When "f" is keyed, ced will first pass a null string to DOS, then
  623.           "dir" and "cd \".  This trick will work OK at the DOS prompt, but
  624.           it may cause problems in some user programs (it would insert a
  625.           blank line, for example, if you were in EDLIN line-insert mode).
  626.  
  627.           Limited "nesting" of chains is allowed.  Consider the following
  628.           definitions:
  629.  
  630.                CED SYN 1 a^b^c
  631.                CED SYN 2 x^1^z
  632.  
  633.           By executing "2", the commands issued will be x, a, b, c,and z. 
  634.           The limitation is that the stored commands ready for chaining
  635.           must not exceed 512 characters total.  In the above example,
  636.           after you have keyed "2" and the "x" is passed to the operating
  637.           system, the stored commands will be:
  638.  
  639.                1^z
  640.  
  641.           which requires 4 characters of storage (3 for the stored
  642.           commands, plus one for a terminating carriage return).  The next
  643.           time ced is called, it will note that "1" is a synonym; the
  644.           first "1" command ("a") is passed to the operating system, and
  645.           the new stored commands will be:
  646.  
  647.                b^c^z
  648.  
  649.           which requires 6 bytes of storage.  At no time can this list of
  650.           stored commands exceed 512 bytes; characters pushed beyond the
  651.           end of this storage will be lost.
  652.  
  653.           For whatever it's worth, you can use chaining directly at the dos
  654.           prompt:
  655.  
  656.                C> dir^cd \
  657.  
  658.           will work as you'd expect.
  659.  
  660.           You may alter the chain character (command separator) via the ced
  661.           command
  662.  
  663.                CED CHAINCH <char>
  664.  
  665.           So, for example, "CED CHAINCH &" would replace ^ with & as the
  666.           command separator.  The chain character can, but probably should
  667.           not, be a control character.  If you are typing the command
  668.           directly into ced, you can just type the control character:
  669.  
  670.  
  671.                             === Ced User's Guide ===
  672.  
  673.  
  674.  
  675.                                                                          11
  676.  
  677.                CED CHAINCH <Ctrl-A>
  678.  
  679.           However, if you are setting the chain character via configuration
  680.           files (below), it may not be possible to type in the control
  681.           character directly.  For this reason, you can also specify a
  682.           control character by typing the caret (^) and a letter key. 
  683.           Thus, if you wanted to use ^Y as the chain character, you
  684.           would use '^' and 'Y':
  685.  
  686.                CED CHAINCH ^Y
  687.  
  688.           Certain control characters should not be used as for this
  689.           purpose, because they are used for other functions by DOS; among
  690.           these are ^C (cancel), ^G (bell), ^H (backspace), ^I (tab),
  691.           ^J (linefeed), ^M (carriage return), ^P (printer on), and ^S
  692.           (stop).
  693.  
  694.           The use of control characters as described has more meaningful
  695.           use in setting the "ignore" and "status request" characters
  696.           (below).
  697.  
  698.  
  699.           Command parameters
  700.           ------------------
  701.  
  702.           This section describes how synonyms and command chaining interact
  703.           with command line parameters.
  704.  
  705.           The simplest case is a single word synonym like
  706.  
  707.                CED SYN d dir
  708.  
  709.           which specifies no special parameter handling.  In this case, any
  710.           command line parameters are simply tacked on after the synonym
  711.           substitution: "d *.exe /w" becomes "dir *.exe /w".
  712.  
  713.           If the synonym itself contains parameters:
  714.  
  715.                CED SYN dw dir /w
  716.  
  717.           a similar situation holds.  For example, "dw *.asm" becomes "dir
  718.           /w *.asm".  You might think of these simple nonchained synonyms
  719.           as just substitutions: when ced sees the synonym, it will simply
  720.           substitute the replacement text, leaving the rest of the command
  721.           line alone.
  722.  
  723.           This simple substitution, however, means that your command line
  724.           parameters must always be the last text of the synonym.  There
  725.           would be no way, for example, to define a synonym that would
  726.           obtain a directory of <name>.exe, where <name> is some filename
  727.  
  728.                             === Ced User's Guide ===
  729.  
  730.  
  731.  
  732.                                                                          12
  733.  
  734.           entered on the command line and ".exe" is part of the synonym. 
  735.           That is, it would not be possible to define a synonym "d" such
  736.           that the command
  737.  
  738.                d foo
  739.  
  740.           would result in a "dir foo.exe" command.
  741.  
  742.           However, ced does provide a way to substitute parameters into the
  743.           middle of a synonym.  Ced recognizes the "%n" dummy parameter
  744.           format used by DOS batch files.  %1 represents the first command
  745.           line parameter, %2 is the second, and so on, up to %9.  Refer to
  746.           your DOS documentation (batch file section) if this is unclear.
  747.  
  748.           Thus, a synonym which would provide the example function is:
  749.  
  750.                CED SYN d dir %1.exe
  751.  
  752.           When "d foo" is executed, "foo" (the first command line
  753.           parameter) is substituted for the %1, resulting in the desired
  754.           command "dir foo.exe".
  755.  
  756.           When a synonym contains chained commands, all parameter
  757.           substitution is performed at one time, before the chain is
  758.           started.  Thus,
  759.  
  760.                CED SYN f a %1^b %2^c %3
  761.  
  762.           when executed "f one two three" will result in three commands:
  763.  
  764.                a one
  765.                b two
  766.                c three
  767.  
  768.           If a chain-command synonym contains no dummy parameters (no %'s)
  769.           the command line parameters will be appended to the end of the
  770.           chain, i.e., as parameters to the last command.  So,
  771.  
  772.                CED SYN f a^b^c
  773.  
  774.           when executed "f foo" will result in the three commands:
  775.  
  776.                a
  777.                b
  778.                c foo
  779.  
  780.           You can change the dummy parameter character from '%' to another
  781.           character using the
  782.  
  783.  
  784.  
  785.                             === Ced User's Guide ===
  786.  
  787.  
  788.  
  789.                                                                          13
  790.  
  791.                CED PARAMCH <char>
  792.  
  793.           command.  The rules described for CHAINCH apply here.
  794.  
  795.  
  796.           Ignoring commands
  797.           -----------------
  798.  
  799.           There may be certain commands that you do not want ced to
  800.           process; for example, you might not want the ERASE command
  801.           stacked.  To instruct ced to ignore a command, use the ced
  802.           command
  803.  
  804.                CED IGNORE <command>
  805.  
  806.           For example:
  807.  
  808.                CED IGNORE erase
  809.  
  810.           When a command is set to IGNORE, ced will not place it in the
  811.           command stack, check for synonyms, or perform any pcall pro-
  812.           cessing (even if you have set PCALL for that command).
  813.  
  814.  
  815.           Ignoring individual commands
  816.           ----------------------------
  817.  
  818.           You may sometimes want ced to ignore processing of a specific
  819.           command.  For example, you may have "dir" defined as a synonym
  820.           for an external program which will display a sorted directory,
  821.           but on occasion want to display a standard DOS directory.  To
  822.           force ced to suspend all processing of a command, precede it with
  823.           ^N (Ctrl-N).  If the first character of input is ^N, ced will
  824.           not stack the command, check for synonyms, or perform any pcall
  825.           processing (just as if it were IGNOREd).  The Ctrl-N, of course,
  826.           is not passed to DOS or to the application program.  For example:
  827.  
  828.                ^Ndir
  829.  
  830.           If you find ^N inconvenient, you can change the ignore character
  831.           to a different character by using the IGNORECH command:
  832.  
  833.                CED IGNORECH ^T
  834.                CED IGNORECH !
  835.  
  836.           See the section on command chaining (above) for more information
  837.           on how to enter control characters in this command.
  838.  
  839.  
  840.  
  841.  
  842.                             === Ced User's Guide ===
  843.  
  844.  
  845.  
  846.                                                                          14
  847.  
  848.           Clearing ced objects
  849.           --------------------
  850.  
  851.           From time to time it may be useful to clear a ced "object": a
  852.           pcall command, a synonym, or an ignore command.  The CLEAR
  853.           command allows you to do this.  The formal syntax is:
  854.  
  855.                CED CLEAR <function> [[FROM] <name>]
  856.  
  857.           This looks more complex than it is.  The <function> is one of
  858.           SYN, USERSYN, PCALL, and IGNORE.  Since the [[FROM] <name>] is
  859.           optional, the simplest form of the clear command is exemplified
  860.           by:
  861.  
  862.                CED CLEAR SYN
  863.  
  864.           which will clear all synonyms.  Similarly,
  865.  
  866.                CED CLEAR PCALL
  867.  
  868.           clears all pcall commands.
  869.  
  870.           You may clear an individual item by including its name.  For
  871.           example:
  872.  
  873.                CED CLEAR USERSYN foo
  874.  
  875.           clears the user synonym "foo", leaving all others synonyms
  876.           undisturbed.
  877.  
  878.           Finally, you can clear all items FROM a specified item through
  879.           the end of the list with the FROM option.  For example:
  880.  
  881.                CED CLEAR USERSYN FROM foo
  882.  
  883.           would clear the user synonym "foo" and all synonyms listed after
  884.           "foo".  This command is particularly useful if you have loaded a
  885.           temporary set of synonyms for some special purpose.  Suppose, for
  886.           example, that you have a set of synonyms already in memory, then
  887.           you load an additional set to be used temporarily.  When you are
  888.           done, the command
  889.  
  890.                CED CLEAR SYN FROM foo
  891.  
  892.           would delete all of the "temporary" synonyms, assuming that the
  893.           first of these was "foo".
  894.  
  895.           Note that SYN and USERSYN objects share storage.  Thus, a
  896.           CLEAR SYN FROM <item> or CLEAR USERSYN FROM <item> will clear all
  897.           synonyms (of either type) FROM the named item.  Similarly, CLEAR
  898.  
  899.                             === Ced User's Guide ===
  900.  
  901.  
  902.  
  903.                                                                          15
  904.  
  905.           SYN and CLEAR USERSYN are functionally identical: all synonyms of
  906.           either type will be cleared.
  907.  
  908.  
  909.           Configuration files
  910.           -------------------
  911.  
  912.           Obviously it would be inconvenient to have to type in all of
  913.           these commands every time you use your computer.  However, you
  914.           may put any ced command into a special ced configuration file,
  915.           and have them loaded all at once.
  916.  
  917.           The configuration file is simply an ASCII text file (created by
  918.           your text editor, EDLIN, or word processor in nondocument mode)
  919.           which contains a series of ced commands.  Just leave out the
  920.           keyword "CED", but include the rest of the command:
  921.  
  922.                Rem       Remarks are OK if preceded by "REM"
  923.                Rem
  924.                Rem       Set chain char to '&'
  925.                Chainch &
  926.                Rem       Set ignore char to '!'
  927.                Ignorech !
  928.                Rem       Set a few synonyms
  929.                Syn d dir
  930.                Syn e edit
  931.                Syn cis cd \talk & talk cis & cd \
  932.                Usersyn dd d ds:1017 L40
  933.                Rem       And a few pcall commands
  934.                Pcall e
  935.                Pcall debug
  936.                Rem       Ignore all DEL, ERASE, and FORMAT commands
  937.                Ignore erase
  938.                Ignore format
  939.                Ignore del
  940.  
  941.           To read in your file, use the CED -f command line switch:
  942.  
  943.                CED -F<filename>
  944.  
  945.           For example, if your configuration file is call CED.CFG, you'd
  946.           use
  947.  
  948.                CED -Fc:\boot\ced.cfg
  949.  
  950.           If you load new configuration files during one computer session,
  951.           the PCALL, SYN, USERSYN, and IGNORE commands are added to those
  952.           already stored, without regard to duplication (see "Multiple
  953.           definitions" below).
  954.  
  955.  
  956.                             === Ced User's Guide ===
  957.  
  958.  
  959.  
  960.                                                                          16
  961.  
  962.           Note that if you have several commands that you want to enter
  963.           into ced (but don't have them in a file), you can use
  964.  
  965.                CED -Fcon
  966.  
  967.           (which specifies CON: as the configuration file name) and then
  968.           type a series of ced commands from the keyboard.  Type ^Z when
  969.           you are done.
  970.  
  971.  
  972.           Changing default buffer sizes
  973.           -----------------------------
  974.  
  975.           Ced maintains six separate internal buffers (regions of memory
  976.           where data is stored).  Each buffer is initially set to a default
  977.           size.  The buffers and their default sizes are:
  978.  
  979.                1. DOS command stack (2048 bytes)
  980.                2. Application program command stack (1024)
  981.                3. Synonym list (2048)
  982.                4. Pcall list (1024)
  983.                5. Ignore command list (1024)
  984.                6. User command list (described below) (1024)
  985.  
  986.           You may make these buffers larger or smaller by including a list
  987.           of buffer sizes the FIRST time you load ced during a session
  988.           (i.e., when you turn on the computer, or after a Ctrl-Alt-Del
  989.           reboot).  Use a -B switch as the FIRST ced command:
  990.  
  991.                CED -Bn1,n2,n3,n4,n5,n6
  992.  
  993.           where n1 is the desired size for buffer 1 (DOS command stack), n2
  994.           is the size for buffer 2 (App program command stack), etc.  You
  995.           need not specify all sizes, but if you skip one or more sizes
  996.           (telling ced to use the default) you must include the separating
  997.           commas.  Examples:
  998.  
  999.                CED -B1000,2000,3000,4000,5000,6000  (Set all sizes)
  1000.                CED -B1000,,3000  (Set sizes 1 and 3)
  1001.                CED -B,,,,,6000 (Set size 6 only)
  1002.  
  1003.           You cannot set any individual size less than 128 bytes, and the
  1004.           total of all sizes must be not exceed 52K (53248) bytes.
  1005.  
  1006.           Remember that the -B command must be the FIRST command used the
  1007.           FIRST time you run ced during each session.  It is not valid any
  1008.           other time.  If you wish to set sizes and read a configuration
  1009.           file during autoexec, the syntax would be:
  1010.  
  1011.                CED -Bn1,n2,n3,n4,n5,n6 -F<filename>
  1012.  
  1013.                             === Ced User's Guide ===
  1014.  
  1015.  
  1016.  
  1017.                                                                          17
  1018.  
  1019.  
  1020.           For your general information, here is what is stored in each of
  1021.           the buffers, and what happens when they fill:
  1022.  
  1023.           1. DOS Command stack: all non-ignored commands of 3 or more
  1024.           characters entered at the DOS prompt.  The command is stored
  1025.           before synonym and pcall processing.  Each stored command
  1026.           requires one byte more than the length of the command. When the
  1027.           buffer fills, the oldest command is deleted.
  1028.  
  1029.           2. Application program command stack: same as above, except
  1030.           commands entered at participating program prompts are stored
  1031.           here.
  1032.  
  1033.           3. Synonym list: the full list of synonyms (both DOS and user
  1034.           synonyms) plus their meanings.  Each entry requires the combined
  1035.           length of the synonym and its associated command plus three
  1036.           bytes.  When the synonym list fills, no new synonyms will be
  1037.           accepted unless a CLEAR is performed first.
  1038.  
  1039.           4. Pcall command list: the list of all pcall commands plus the
  1040.           most recent parameter list for each.  Each entry requires the
  1041.           combined length of the command and its current parameters
  1042.           (including leading separators) plus two bytes.  If the buffer is
  1043.           full when a "CED PCALL" command is entered, the new pcall command
  1044.           will not be accepted.  If the buffer is full when a pcallable
  1045.           command is entered, its parameters will not be remembered.
  1046.  
  1047.           5. Ignore command list: the list of all IGNORE commands.  Each
  1048.           entry requires the command length plus one byte.  If the buffer
  1049.           is full when a new "CED IGNORE" command is entered, the new
  1050.           command will be rejected.
  1051.  
  1052.           6. User-installed command list: the list of all user-installed
  1053.           commands.  Requires the command length plus six bytes of storage
  1054.           for each.  New commands will be rejected if the buffer is full.
  1055.  
  1056.  
  1057.           Status display
  1058.           --------------
  1059.  
  1060.           You may obtain a partial display of ced status any time CED is
  1061.           active (i.e., at the DOS prompt or in a compatible program
  1062.           awaiting input).  Do this by hitting ^T (Ctrl-T).  Ced will first
  1063.           display all SYNonyms and  USERSYNonyms, then a list of all
  1064.           buffer sizes.  For each buffer ced will show the total bytes
  1065.           allocated and the number of bytes free.
  1066.  
  1067.           When the display is complete, ced will redisplay any partial
  1068.           input that you typed before ^T, and you may continue data entry.
  1069.  
  1070.                             === Ced User's Guide ===
  1071.  
  1072.  
  1073.  
  1074.                                                                          18
  1075.  
  1076.  
  1077.           If ^T is not convenient, you can change the status request
  1078.           character by using the ced command
  1079.  
  1080.                CED STATCH <character>
  1081.  
  1082.           as in "CED STATCH ^A" or "CED STATCH %".  See the section on
  1083.           command chaining for more information on using control characters
  1084.           in this command.
  1085.  
  1086.  
  1087.           Multiple definitions
  1088.           --------------------
  1089.  
  1090.           It is possible to duplicate a definition within one of the ced
  1091.           lists (SYN, USERSYN, PCALL, IGNORE).  For example, you may create
  1092.           more than one synonym for "d".  In the event of multiple
  1093.           definitions, ced will always use the newest.
  1094.  
  1095.           Suppose, for example, that you have "d" defined as a SYN for
  1096.           "dir".  If you subsequently issue the command "CED SYN d debug",
  1097.           you will have two synonyms for "d".  When you enter "d", ced will
  1098.           use the latest definition: "debug".  If you then issue a "CLEAR
  1099.           SYN d", ced will again use the latest definition and clear the
  1100.           "debug" synonym, at which point the "dir" definition again
  1101.           becomes effective.
  1102.  
  1103.           Multiple definitions have no real meaning for PCALL and IGNORE,
  1104.           but they are supported nonetheless.
  1105.  
  1106.  
  1107.           User-installed commands
  1108.           -----------------------
  1109.  
  1110.           This section describes how to add new resident commands to DOS
  1111.           using ced.  It is an advanced topic, and is intended for
  1112.           programmers only; you don't need to read this section to use ced.
  1113.  
  1114.           Ced provides a means to enqueue new DOS commands, that is, to add
  1115.           internal commands to DOS.  Once enqueued, ced will call a routine
  1116.           that you specify whenever the user types the new command (at
  1117.           the DOS prompt, or in a "participating" program).
  1118.  
  1119.           Access to ced service is provided via a bogus DOS function,
  1120.           0FFH.  This function behaves as a normal DOS function; that is,
  1121.           you must set up the registers as needed by the call, place a 0FFH
  1122.           in register AH, and execute an INT 21H.  The two subfunctions are
  1123.           described below; the subfunction code is placed in register
  1124.           AL.
  1125.  
  1126.  
  1127.                             === Ced User's Guide ===
  1128.  
  1129.  
  1130.  
  1131.                                                                          19
  1132.  
  1133.  
  1134.           SUBFUNCTION 0: ENQUEUE
  1135.  
  1136.           This subfunction allows you to enqueue a new command.  Input
  1137.           register use is as follows:
  1138.  
  1139.                AH = 0FFH (ced service)
  1140.  
  1141.                AL = 0 (ENQUEUE)
  1142.  
  1143.                BL = MODE
  1144.                     This is a bit flag which tells ced when to call your
  1145.                     routine.  You have the option of being called if your
  1146.                     command is typed at the DOS prompt, at a user program
  1147.                     prompt, or both.  Bit 0, if set, specifies that you are
  1148.                     to be called at the DOS prompt; Bit 1, if set,
  1149.                     specifies that you are to be called at a user program
  1150.                     prompt.
  1151.  
  1152.                DS:SI = command name
  1153.                     This is a dword pointer to your command (i.e., you are
  1154.                     to be called when the user types this string).  The
  1155.                     command must be from one to eight characters,
  1156.                     terminated by a carriage return.  Ced is not case
  1157.                     sensitive.
  1158.  
  1159.                ES:DI = command processor entry point
  1160.                     This is a dword pointer to the routine which is to be
  1161.                     executed when the new command is entered.
  1162.  
  1163.  
  1164.           SUBFUNCTION 1: DEQUEUE
  1165.  
  1166.           This subfunction allows you to dequeue a user command; after a
  1167.           command has been dequeued, ced will no longer call you if the
  1168.           user types your command.  Input register use is:
  1169.  
  1170.                AH = 0FFH (ced service)
  1171.  
  1172.                AL = 1 (DEQUEUE)
  1173.  
  1174.                DS:SI = command name
  1175.                     A dword pointer to the name of the command to be
  1176.                     dequeued (i.e., the same DS:SI as was used to enqueue
  1177.                     the command).
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.                             === Ced User's Guide ===
  1185.  
  1186.  
  1187.  
  1188.                                                                          20
  1189.  
  1190.           RETURN REGISTERS
  1191.  
  1192.           On return from ced service (DOS function 0FFH), all registers are
  1193.           preserved except AX.  The carry flag, if set, indicates that an
  1194.           error occurred; AX has the error code, which will be one of:
  1195.  
  1196.                1:   Invalid function.  At present, only subfunctions 0
  1197.                     and 1 are supported.  Subfunction 2 is reserved.
  1198.  
  1199.                2:   Command not found (DEQUEUE only).
  1200.  
  1201.                8:   Insufficient memory (ENQUEUE only).
  1202.  
  1203.                13:  Invalid data. (ENQUEUE only; bad MODE flag, or invalid
  1204.                     command length).
  1205.  
  1206.           NOTE: In current versions of DOS, AH returns 0FFH if function
  1207.           0FFH is requested and ced is not installed.  You may use the
  1208.           reserved subfunction (2), at your own risk, to test for ced
  1209.           installation.  If AH returns any value other than 0FFH, ced is
  1210.           probably installed.
  1211.  
  1212.  
  1213.           COMMAND PROCESSOR
  1214.  
  1215.           Your command processor is entered via a far call from ced.  Entry
  1216.           registers are as follows:
  1217.  
  1218.                BL = MODE
  1219.                     This is the same bit flag as is used in the ENQUEUE
  1220.                     subfunction.  You may use it to test "where you are".
  1221.  
  1222.                CL = MAXLEN
  1223.                     This is the maximum allowed length of the user input
  1224.                     string (i.e., the value of byte 0 of the DOS function
  1225.                     0AH input buffer) less one.
  1226.  
  1227.                DS:DX = Command tail pointer
  1228.                     This is a dword pointer to the command tail of the
  1229.                     user's input.  For example, if your command is "hello"
  1230.                     and the user types "hello sam", DS:DX will point to the
  1231.                     space after "hello".
  1232.  
  1233.                DS:DI = Command pointer
  1234.                     This is a dword pointer to the first byte of the actual
  1235.                     user input.
  1236.  
  1237.           Note that DS:DI and DS:DX point to buffer space within ced, not
  1238.           to the actual DOS function 0AH input buffer.  There are no
  1239.           length attribute bytes preceding the buffer; DS:SI points to the
  1240.  
  1241.                             === Ced User's Guide ===
  1242.  
  1243.  
  1244.  
  1245.                                                                          21
  1246.  
  1247.           first byte of the buffer, not the third.  Ced will copy the final
  1248.           buffer, after all processing, to the actual input buffer.
  1249.  
  1250.           You may manipulate the buffer to your heart's content.  It is 255
  1251.           characters long, but ced will truncate the string if necessary
  1252.           (if the final command is longer than the maximum allowed by the
  1253.           function 0AH request).  In particular, note two things about the
  1254.           ced buffer:
  1255.  
  1256.                1.   The string MUST be terminated by a carriage return
  1257.                     ASCII 13).
  1258.  
  1259.                2.   If you null out the buffer (by putting a carriage
  1260.                     return in relative byte 0) ced will return a null
  1261.                     string to DOS or the user program.  This is probably
  1262.                     what you will want to do.
  1263.  
  1264.           There are few restrictions on what you can do within your service
  1265.           routine.  You may request other DOS service (EXCEPTION: do not
  1266.           request more buffered input via function 0AH!!), and you need not
  1267.           preserve any registers except SS:SP.  The stack in effect on
  1268.           entry will have about 200 bytes free; switch to a larger internal
  1269.           stack if necessary.
  1270.  
  1271.           Return to ced via a far RET.
  1272.  
  1273.           Appendix E contains a sample assembler program to enqueue a
  1274.           trivial command.
  1275.  
  1276.  
  1277.           Problem reporting
  1278.           -----------------
  1279.  
  1280.           If you find any problems with ced, please report them to me,
  1281.           preferably at CompuServe ID 76703,2002.  Before reporting
  1282.           problems, however, please take the following steps:
  1283.  
  1284.                1. Reread the documentation!
  1285.  
  1286.                2. Install ced in a "clean" environment, i.e., without any
  1287.                other resident utilities.  Temporarily rename your
  1288.                AUTOEXEC.BAT and CONFIG.SYS files to other names; reboot,
  1289.                reinstall ced, and test.  If it works correctly, there is a
  1290.                conflict with some other program.  Try to isolate the
  1291.                conflict by reinstalling your other programs one by one. You
  1292.                may even be able to resolve the conflict by varying the load
  1293.                order.  If you locate the conflict, let me know about it.  I
  1294.                cannot guarantee that it will be resolved, but I will make
  1295.                an attempt when time permits.
  1296.  
  1297.  
  1298.                             === Ced User's Guide ===
  1299.  
  1300.  
  1301.  
  1302.                                                                          22
  1303.  
  1304.                It would not be necessary to rename CONFIG.SYS if it only
  1305.                contains FILES, BUFFERS, COUNTRY, FCBS, and ANSI.SYS
  1306.                statements.
  1307.  
  1308.           If the problem persists, please report the problem as accurately
  1309.           and completely as possible.  Include the ced version number
  1310.           (obtained by the command CED VER), and a listing of your
  1311.           CONFIG.SYS and AUTOEXEC.BAT files if you think that might have
  1312.           some bearing.
  1313.  
  1314.  
  1315.           Copyright and Disclaimer
  1316.           ------------------------
  1317.  
  1318.           THIS VERSION of ced is hereby placed in the public domain.  Both
  1319.           ced and this documentation are, however, copyrighted by the
  1320.           author.  CED IS INTENDED FOR YOUR PRIVATE, NONCOMMERCIAL USE
  1321.           ONLY.  You may make copies of the ced program and documentation
  1322.           files for your own use, and you may copy the files for others. 
  1323.           You may not, however, charge for such copies, or in any other way
  1324.           sell the program or otherwise attempt to make money from it or
  1325.           any modified version of it.  Please.
  1326.  
  1327.           An exception to the above is, however, granted to recognized
  1328.           user's groups, which are hereby authorized to charge a small
  1329.           amount (not to exceed $6.00) for media, postage, handling,
  1330.           and whatnot.
  1331.  
  1332.           I do not warrant that the documentation is accurate, or that the
  1333.           program operates as designed.  I will not be liable for any
  1334.           damages of any kind sustained through the use of the program.  By
  1335.           using the program, you agree to this.
  1336.  
  1337.           Your comments, suggestions, and friendly criticisms are welcome. 
  1338.           The best way to contact me is via CompuServe, either through
  1339.           Easyplex or (better) at the IBM Novice Forum (PCS-129, SGIBMN). 
  1340.           West Coast people, please don't call me at ridiculous hours.
  1341.  
  1342.           IBM is a registered trademark of International Business Machines
  1343.           Corporation. 
  1344.  
  1345.           MS-DOS is a trademark of Microsoft Corporation.
  1346.  
  1347.                            Both ced and this document are:
  1348.  
  1349.                                 Copyright (c) 1985 by
  1350.                                Christopher J. Dunford   
  1351.                               10057-2 Windstream Drive
  1352.                               Columbia, Maryland 21044
  1353.                               CompuServe ID 76703,2002
  1354.  
  1355.                             === Ced User's Guide ===
  1356.  
  1357.  
  1358.  
  1359.                                                                          23
  1360.  
  1361.  
  1362.           Future of ced
  1363.           -------------
  1364.  
  1365.           This will very likely be the final public domain version of ced. 
  1366.           I have been encouraged by many people to make available as a
  1367.           retail product an enhanced version of ced, and (somewhat against
  1368.           my better judgement) I have determined to do so.  This was not my
  1369.           intent when the project was begun, but the amount of time spent
  1370.           responding to mail and phone calls about the program is out of
  1371.           all proportion to what I can afford.
  1372.  
  1373.           The commercial version will contain at least these enhancements
  1374.           and new features, most suggested by 1.0B users:
  1375.  
  1376.                -- Function key compatibility with DOS (for EDLIN).
  1377.                -- PACK command deletes all duplicate definitions.
  1378.                -- KILL command removes ced from memory.
  1379.                -- SAVE command saves complete current context to disk.
  1380.                -- STATUS command allows display of ced status from within a
  1381.                synonym.
  1382.                -- Access to environmental variables (PATH, etc., plus
  1383.                any SET variables).
  1384.                -- Predefined variables to allow use of current path, date,
  1385.                etc., in synonyms.
  1386.                -- Minimal synonyms to allow synonym processor to match any
  1387.                of a variety of abbreviations.
  1388.                -- Error message suppression on request.
  1389.                -- Chained commands will not be stacked, making recall of
  1390.                last typed command easier.
  1391.                -- More powerful CLEAR command.
  1392.                -- A few enhancements to the command editor, and several
  1393.                other minor enhancements.
  1394.  
  1395.           Other suggestions are welcome.  If you are interested in the new
  1396.           version, contact me at the copyright address after July 1, 1985.
  1397.           The price is EXPECTED to be about $25.
  1398.  
  1399.           Version 1.0C, incidentally, contains no KNOWN bugs.
  1400.  
  1401.           Date: June 14, 1985
  1402.           Program version:  1.0C
  1403.           Document version: 1.0C/2
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.                             === Ced User's Guide ===
  1413.  
  1414.  
  1415.  
  1416.                                                                          24
  1417.  
  1418.                              Appendix A: Command summary
  1419.                              ---------------------------
  1420.  
  1421.           The following is a complete summary of all ced commands.  These
  1422.           commands may be included in a ced configuration file (with the
  1423.           exception of -F and -B), or they may be typed in directly by
  1424.           prefixing them with "CED ".
  1425.  
  1426.           -Bn1,n2,n3,n4,n5,n6      Sets the sizes of the six internal
  1427.                                    buffers.  Valid ONLY as FIRST command
  1428.                                    when installing ced after boot or
  1429.                                    reboot.
  1430.  
  1431.           -F<Filename>             Loads a ced configuration file.  Not a
  1432.                                    valid command within a config file.
  1433.  
  1434.           SYN <synonym> <command>  Defines a synonym.  The first word is
  1435.                                    the synonym, all remaining words are
  1436.                                    substituted for the synonym.
  1437.  
  1438.           USERSYN <synonym> <command>  Defines a user synonym.  Identical
  1439.                                    to SYN, except that the synonym is
  1440.                                    available within user programs rather
  1441.                                    than at the DOS prompt.
  1442.  
  1443.           PCALL <command>          Defines a command subject to pcall
  1444.                                    processing.
  1445.  
  1446.           IGNORE <command>         Defines a command to be ignored--ced
  1447.                                    will not perform any processing on this
  1448.                                    command at all.
  1449.  
  1450.           CHAINCH <char>           Defines the command chaining character,
  1451.                                    which is the character used to separate
  1452.                                    commands in a multi-command synonym. 
  1453.                                    Normally '^'.
  1454.  
  1455.           IGNORECH <char>          Defines the keyboard-ignore character;
  1456.                                    when this character is typed as the
  1457.                                    first character of keyboard input, ced
  1458.                                    will perform no further processing on
  1459.                                    it.  Normally ^N.
  1460.  
  1461.           STATCH <char>            Defines the status request character. 
  1462.                                    When you type this character while ced
  1463.                                    is active, ced will display its status. 
  1464.                                    Normally ^T.
  1465.  
  1466.           PARAMCH <char>           Defines the dummy parameter character. 
  1467.                                    Normally '%'.
  1468.  
  1469.                             === Ced User's Guide ===
  1470.  
  1471.  
  1472.  
  1473.                                                                          25
  1474.  
  1475.  
  1476.           CLEAR <function> [[FROM] <name>]   Clears all or part of a
  1477.                                    list of ced objects.  <function> is one
  1478.                                    of SYN, USERSYN, PCALL, or IGNORE. 
  1479.                                    Without arguments, clears all of the
  1480.                                    specified list.  With a <name>, clears
  1481.                                    that item only.  With a FROM <name>,
  1482.                                    clears that item and all subsequent
  1483.                                    items. 
  1484.  
  1485.           VER                      Display ced version number and copyright
  1486.                                    notice.
  1487.  
  1488.  
  1489.           Commands may be abbreviated as follows:
  1490.  
  1491.                USERSYN        USYN
  1492.                PCALL          PC       
  1493.                IGNORE         IG
  1494.                CHAINCH        CC
  1495.                IGNORECH       IC   
  1496.                STATCH         SC
  1497.                PARAMCH        PM   (NOT PC!)
  1498.                CLEAR          CL
  1499.  
  1500.           Note, however, that the arguments to CLEAR may NOT be
  1501.           abbreviated; CLEAR USYN or CLEAR IG are not valid.
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.                             === Ced User's Guide ===
  1527.  
  1528.  
  1529.  
  1530.                                                                          26
  1531.  
  1532.                            Appendix B: Order of Processing
  1533.                            -------------------------------
  1534.  
  1535.           Ced performs its basic processing in the following order:
  1536.  
  1537.           1. Obtain input.  If there is a chained command pending, obtain
  1538.           input from the chain; otherwise from keyboard.
  1539.  
  1540.           2. Check for "ignore".  If command is an "ignore" command or if
  1541.           the first character of input is the ignore character, skip all
  1542.           further processing.
  1543.  
  1544.           3. Stack the command (if longer than two characters) in the
  1545.           appropriate command stack.
  1546.  
  1547.           4. Perform pcall (parameter recall) processing and store the
  1548.           result for pcall processing next time the same command is
  1549.           entered.
  1550.  
  1551.           5. Perform synonym processing and parameter substitution.
  1552.  
  1553.           6. Check for CED command.  If input is a CED command, process and
  1554.           clear the input (returning null string to caller).  Skip rest.
  1555.  
  1556.           7. Check for command chaining.  If the chain character appears in
  1557.           the input, store all commands after the first chain character for
  1558.           later processing, and pass back the first command only.
  1559.  
  1560.           8. Examine the resulting command and see if it's a user-installed
  1561.           command.  If so, call user command processor.
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.                             === Ced User's Guide ===
  1584.  
  1585.  
  1586.  
  1587.                                                                          27
  1588.  
  1589.                                Appendix C: Limitations
  1590.                                -----------------------
  1591.  
  1592.           There is a limit of 255 characters on any input line from a ced
  1593.           configuration file.  DOS will limit you to 127 characters at the
  1594.           DOS prompt.
  1595.  
  1596.           For PCALL, SYN, USERSYN, and IGNORE to be effective, their
  1597.           commands must begin in the first column of input and must be
  1598.           separated from any parameters by one of the following characters:
  1599.  
  1600.                ; , < > | = + [ ] / <Tab> <Space>
  1601.  
  1602.           Thus, if you have "cd" defined for pcall processing, "cd\" will
  1603.           not work correctly.  However, "cd \" will be OK.  Similarly, if
  1604.           you have a synonym "d" for "debug", the command "c:\util\d" will
  1605.           not work, nor will " d" (note leading space).
  1606.  
  1607.           Remember that ced is active only at the DOS prompt or when a user
  1608.           program requests input via DOS function 0AH.  This has several
  1609.           effects:
  1610.  
  1611.                Programs which allow you to execute DOS commands or other
  1612.                programs as subtasks generally do not use DOS function 0AH
  1613.                to input the name of the subtask or command; thus, ced is
  1614.                not active, and synonyms are usually not effective.
  1615.  
  1616.                Ced cannot operate on statements in batch files.  Thus,
  1617.                synonyms and user-installed commands will not be recognized
  1618.                if they are batch statements, and ced commands will cause
  1619.                ced to be reloaded (which is probably not what you want).
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.                             === Ced User's Guide ===
  1641.  
  1642.  
  1643.  
  1644.                                                                          28
  1645.  
  1646.                                 Appendix D: Versions
  1647.                                 --------------------
  1648.  
  1649.           1.0A/B    PARAMCH added.  Fixed problem which caused unpre-
  1650.           06/01/85  dictable results if DOS function 0AH called with
  1651.                     8088 direction flag set.  Status display cleaned up. 
  1652.                     Processing order altered to allow synonyms for CED SYN
  1653.                     to process correctly.  Early ROM BIOS bug relating to
  1654.                     cursor size trapped. Config file processing speeded
  1655.                     up. Problems parsing -B command fixed.  Nesting
  1656.                     chaining allowed, as well as direct entry of chained
  1657.                     commands at the DOS/program prompt.  Some minor
  1658.                     incompatibilities with other resident programs elim-
  1659.                     inated.
  1660.  
  1661.           1.1       Problem with immediate parameters to SYNs (e.g., "d/w",
  1662.           06/03/85  where "d" is a SYN) corrected.  Problem with pcall list
  1663.                     overflow corrected.  Fixed error with ^Z processing
  1664.                     during configuration file read.  Added <^Bksp>,
  1665.                     <^Home>, and function keys F1-F4.  Added redisplay of
  1666.                     command passed in input buffer, if different from that
  1667.                     last command entered.
  1668.             
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.                             === Ced User's Guide ===
  1698.  
  1699.  
  1700.  
  1701.                                                                          29
  1702.  
  1703.                             Appendix E: User Command Demo
  1704.                             -----------------------------
  1705.  
  1706.           Comment *
  1707.  
  1708.                userdemo.com - demo of ced user command enqueuing
  1709.  
  1710.                Assembly: (M)ASM userdemo;
  1711.                          LINK userdemo;   (ignore NO STACK message)
  1712.                          EXE2BIN userdemo userdemo.com
  1713.  
  1714.                Use:      Just type 'userdemo'.  You now have
  1715.                          a new DOS command, "hello"
  1716.  
  1717.                Author:   CJDunford
  1718.                          05/28/85
  1719.  
  1720.           *
  1721.  
  1722.           CED       equ 0FFH            ; Special "DOS" fn for CED service
  1723.  
  1724.           ENQUEUE   equ 0               ; Subfunction: enqueue
  1725.           DEQUEUE   equ 1               ; Subfunction: dequeue
  1726.  
  1727.           DOS       equ 1               ; Cmd to be active at DOS prompt
  1728.           USER      equ 2               ; Cmd to be active at user prompt
  1729.  
  1730.           CR        equ 13
  1731.           LF        equ 10
  1732.  
  1733.           code segment
  1734.           assume cs:code,ds:code
  1735.           org 100H
  1736.           main proc far
  1737.                jmp short Install        ; Go to installation
  1738.  
  1739.           ; -----------------------------------------------------
  1740.           ; This is the command processor.  It will be called
  1741.           ; whenever the user types "hello" at the DOS prompt.
  1742.           ; The routine simply prints the string "Hi there, ace".
  1743.           ;
  1744.           ; On entry:
  1745.           ;    BL: mode flag
  1746.           ;       1 = at DOS prompt
  1747.           ;       2 = at user program prompt
  1748.           ;    CL: max length of input
  1749.           ;    DS:SI => user command
  1750.           ;    DS:DX => user command tail
  1751.           ;
  1752.           ; Remember to null out the user string so that
  1753.  
  1754.                             === Ced User's Guide ===
  1755.  
  1756.  
  1757.  
  1758.                                                                          30
  1759.  
  1760.           ; it is not passed on to DOS, then exit via a far
  1761.           ; return to ced.  Not necessary to preserve any
  1762.           ; registers.
  1763.           ; ------------------------------------------------------
  1764.           Hello proc far                ; Must be a far procedure
  1765.                mov byte ptr [si],CR     ; Null out the user's input
  1766.  
  1767.                mov ax,cs                ; Set up local addressing
  1768.                mov ds,ax
  1769.  
  1770.                mov dx,offset HiThere$   ; Display our message
  1771.                mov ah,9
  1772.                int 21H
  1773.  
  1774.                ret                      ; No need to restore any regs
  1775.           Hello endp
  1776.  
  1777.           HiThere$ db 'Hi there, ace',CR,LF,'$'   ; Message to be displayed
  1778.  
  1779.  
  1780.           ; -----------------------------------------------
  1781.           ; This is the installation routine.  It sets up
  1782.           ; the regs for a call to the ced command enqueuing
  1783.           ; service, enqueues the command, and terminates,
  1784.           ; leaving the command service routine resident
  1785.           ; ------------------------------------------------
  1786.           Install:
  1787.                mov ah,CED               ; CED service request
  1788.                mov al,ENQUEUE           ; Enqueue a new command
  1789.                mov bl,DOS               ; To be active at DOS prompt
  1790.                mov si,offset Hello$     ; DS:SI => command ("Hello")
  1791.                mov di,offset Hello      ; ES:DI => service routine
  1792.                int 21H                  ; Enqueue new command
  1793.                jnc OK                   ; No carry, no error
  1794.  
  1795.                mov dx,offset Error$     ; Only 1 error possible here
  1796.                mov ah,9                 ; Print string
  1797.                int 21H
  1798.                int 20H                  ; Return to DOS
  1799.  
  1800.           OK:
  1801.                mov dx,offset Install    ; OK: terminate/resident
  1802.                int 27H
  1803.           main endp
  1804.  
  1805.           Hello$    db 'hello',CR        ; New command
  1806.           Error$    db 'ced user command list full',CR,LF,'$'
  1807.  
  1808.           code ends
  1809.           end main
  1810.  
  1811.                             === Ced User's Guide ===
  1812.